﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Mvc;

namespace GroceryPriceBook.Core.ViewModel
{
	public class ProductCategory
	{
		public ProductCategory()
		{
			Products = new List<Product>();
			ProductCategories = new List<ProductCategory>();
		}

		public System.Guid Id { get; set; }
		public System.Guid? ParentProductCategoryId { get; set; }

		[Required(ErrorMessage = "Required")]
		[StringLength(100)]
		public string Name { get; set; }

		[StringLength(500)]
		[DataType(DataType.MultilineText)]
		public string Description { get; set; }

		public List<Product> Products { get; set; }
		public List<ProductCategory> ProductCategories { get; set; }
		public IEnumerable<SelectListItem> ProductCategorySelectListItems { get; set; }
		public ProductCategory ParentProductCategory { get; set; }
	}
}
